Skip to main content

IoT Device emulation

Using Corvina there are a lot of cases where you need to emulate an IoT device, for example:

  • You want to test your application with a real device
  • You want to test the flow of data from a device to your application (passing through Corvina)
  • You want to test the flow of data from your application to a device (passing through Corvina)
  • You want to stress test your application sending a lot of data from one or more devices (you can call your own API obviously, but sometimes it's easier configuring a device to do that)

In all these cases you need to emulate a device, and Corvina provides a way to do that.

On npmjs.com you can find the @corvina/device-example package that you can use to emulate a device.

You need to create a .env file and after that you can:

  • send random tag data to Corvina
  • send random alarm to Corvina

What's more? Every device is connected to Corvina using JMobile or using another npm package @corvina/device-client. The last one is a simple Corvina client written in TypeScript that you can use to connect your device to Corvina. The code is open source and we are happy to accept pull requests!

With device-client you can write your own logic to emulate a device but you can also use this client in production to connect your device to Corvina.